﻿<%@page import="com.dfhc.ISystemConstant"%>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<!DOCTYPE html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css"
	href="${pageContext.request.contextPath }/css/process/jquery-ui-1.8.4.custom/css/smoothness/jquery-ui-1.8.4.custom.css"
	rel="stylesheet" />
	
<link type="text/css"  href="${pageContext.request.contextPath }/css/GX_css/flowcss.css" rel="stylesheet" />	

<script type="text/javascript" src="${pageContext.request.contextPath }/js/cipher/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/process/path.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/process/raphael.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/cipher/jquery-ui-1.10.1.custom.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/process/myflow.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/process/myflow.jpdl4.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/process/myflow.editors.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/process/definedFlow.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/myalert.js"></script>
   
<script type="text/javascript">
	$(function() {
		$.myflow.config.default_pro_key='<%=ISystemConstant.PROCESS_PREFIX%>';//初始化流程图的key
		
		$('#myflow').myflow(
						{
							basePath : "${pageContext.request.contextPath }",
							restore : eval("({states:{rect1:{type:'fork',text:{text:'并行任务01'}, attr:{ x:580, y:130, width:50, height:50}, props:{name:{value:'并行任务01'},documentation:{value:'并行任务节点'}}},rect2:{type:'check',text:{text:'人员审核01'}, attr:{ x:432, y:206, width:100, height:50}, props:{name:{value:'人员审核01'},candidateGroups:{value:'2011201702210001001'},documentation:{value:'前台会员'},isSequential:{value:'false'}}},rect3:{type:'check',text:{text:'组长审核02'}, attr:{ x:681, y:200, width:100, height:50}, props:{name:{value:'组长审核02'},candidateGroups:{value:'2011201702140000001'},documentation:{value:'管理员串行'},isSequential:{value:'true'}}},rect4:{type:'task',text:{text:'任务19'}, attr:{ x:434, y:322, width:100, height:50}, props:{name:{value:'任务19'},candidateGroups:{value:''},documentation:{value:''},isSequential:{value:''}}},rect5:{type:'notify',text:{text:'部长信息汇总'}, attr:{ x:555, y:489, width:100, height:50}, props:{name:{value:'部长信息汇总'},candidateGroups:{value:'2011201702140000001'},documentation:{value:'任务节点审核'},isSequential:{value:'true'}}},rect6:{type:'task',text:{text:'任务节点02'}, attr:{ x:675, y:322, width:100, height:50}, props:{name:{value:'任务节点02'},candidateGroups:{value:'2011201702210001001'},documentation:{value:'任务节点'},isSequential:{value:'false'}}},rect7:{type:'fork',text:{text:'任务汇总'}, attr:{ x:578, y:390, width:50, height:50}, props:{name:{value:'任务汇总'},documentation:{value:'任务汇总'}}},rect8:{type:'end',text:{text:'结束23'}, attr:{ x:579, y:577, width:50, height:50}, props:{name:{value:'结束23'},documentation:{value:''}}},rect20:{type:'start',text:{text:'自定义开始菜单'}, attr:{ x:580, y:16, width:50, height:50}, props:{name:{value:'自定义开始菜单'},extensionElements:{value:'自定义表单属性'}}}},paths:{path10:{from:'rect1',to:'rect2', dots:[],text:{text:'TO 人员审核01',textPos:{x:0,y:-10}}, props:{text:{value:''}}},path11:{from:'rect1',to:'rect3', dots:[],text:{text:'TO 组长审核02',textPos:{x:0,y:-10}}, props:{text:{value:''}}},path12:{from:'rect3',to:'rect6', dots:[],text:{text:'TO 任务节点02',textPos:{x:0,y:-10}}, props:{text:{value:''}}},path13:{from:'rect6',to:'rect7', dots:[],text:{text:'TO 任务汇总',textPos:{x:0,y:-10}}, props:{text:{value:''}}},path14:{from:'rect7',to:'rect5', dots:[],text:{text:'TO 部长信息汇总',textPos:{x:0,y:-10}}, props:{text:{value:''}}},path15:{from:'rect5',to:'rect8', dots:[],text:{text:'TO 结束23',textPos:{x:0,y:-10}}, props:{text:{value:''}}},path16:{from:'rect2',to:'rect4', dots:[],text:{text:'TO 任务19',textPos:{x:0,y:-10}}, props:{text:{value:''}}},path17:{from:'rect4',to:'rect7', dots:[],text:{text:'TO 任务汇总',textPos:{x:0,y:-10}}, props:{text:{value:''}}},path21:{from:'rect20',to:'rect1', dots:[],text:{text:'TO 并行任务01',textPos:{x:0,y:-10}}, props:{text:{value:''}}}},props:{props:{processId:{value:'ZD_DFHC_f8c05e6a-d1b3-4142-a0ad-710ec84b7209'},name:{value:'测试自定义'},documentation:{value:'自定义流程测试'}}}})"),
							tools : {
								save : {
									onclick : function(data) {
										
										console.log(data);//打印
										
										var url='${pageContext.request.contextPath}/pubController/doSaveProcess';
										submitData(url,data);
										
									}
								}
							}
						});


	});
	
	
</script>

</head>
<body>

<!-- begin 流程自定义表单属性 -->
<div  class="zhezhaop"></div>
<div  class="zhezhao">

  <div class="zhe_title">
    
     <div class="title">
                          设置/修改表单属性值
     </div>
    <div class="title_cls"  onclick="javascript:colseTan();">×</div>
  
  </div>
  <div  class="zhe_body">
  
   <!-- begin tab属性值 -->
     <div class="zhe_tab_lay">
          
          <div class="zhe_tab">
	            <div class="zhe_tab_body" id="zhe_tab_body">
		      
			        <div class="tab_row tab_h" id="tab_header">
			           <div>id</div>
			           <div>名称</div>
			           <div>类型</div>
			        </div>
		   
		        </div>
          
          </div>
       
	     <div class="zhe_lay_btn">
	      
	       <a class="btn_m" href="javascript:void(0);" onclick="javascript:reduce_prop();">-</a>
	       <a class="btn_m" href="javascript:void(0);" onclick="javascript:add_prop();">+</a>
	    
	     </div>
       
	    
    </div>
    
   
  <!-- end tab 属性值 -->
   
   <!-- begin form -->
   <div class="prop_div">
   
	   <div class="prop_form_div">
	   
	   
	   </div>
	   
	   <!-- begin枚举类型 -->
	   
	   <div class="enum_layout">
	   
	      <div class="enum_tab_layout" >
	      
	         <div class="enum_layout_border">
	         
	            <div class="enum_tab">
	            
	              <div class="enum_tab_row enum_header" > 
	              
	                <div class="enum_tab_cell">枚举型id</div>
	                <div class="enum_tab_cell">枚举型value</div>
	              
	              
	              </div>
	               
	            </div>
	           
	         
	         </div>
	          <div class="zhe_lay_btn">
	      
			       <a class="btn_m" href="javascript:void(0);" onclick="javascript:reduce_emun();">-</a>
			       <a class="btn_m" href="javascript:void(0);" onclick="javascript:add_emun()" >+</a>
			    
			  </div>
	      
	      
	      
	      </div>
	      
	      <div class="enum_form_layout" >
	      
	        <div class="enum_form">
	        
	         
	        
	        </div>
	      
	      </div>
	   
	   </div>
	   
	   <!-- begin 枚举类型模板 -->
	   <div class="enum_form_tempalet">
	   
           <div>枚举id</div>
           <div><input class="enumInpKey" name="enum_key" placeholder="填入枚举类型的key"/></div>
           <div>枚举值</div>
           <div><input class="enumInpVal" name="enum_value" placeholder="填入枚举值"/></div>
	   </div>
	   <!-- end  枚举类型模板 -->
	   
	   <!-- end 枚举类型 -->
	   
   </div>
   
   
   <!-- 隐藏模板 -->
   <div id="template_div" style="display: none;">
   
       <div>
       <span>id</span>
       <span> <input name="id" placeholder="输入该输入框的属性id"/>  </span>
     </div>
     
     <div>
       <span>名称</span>
       <span> <input name="name" placeholder="输入表单名称"/>  </span>
     </div>
     
     <div>
	       <span>类型</span>
	       <span> 
	       
	         <select name="type">
	           <option value="string"> string </option>
	           <option value="textarea">textarea</option>
	           <option value="file"> file </option>
	           <option value="enum"> enum </option>
	         </select>
	
	       </span>
     </div>
      
      
   </div>
   
   <!-- end form -->
  
  </div>
  
  <div class="zhe_footer">
  
    <a class="btn_m" href="javascript:void(0);" onclick="javascript:colseTan();">取&nbsp;消</a>
    <a class="btn_m" href="javascript:void(0);" onclick="javascript:saveFormProp();">保&nbsp;存</a>
  
  </div>

</div>

<!-- end 流程自定义表单属性 -->

 <div class="content clearfix" id="flowLayout">
 
		 <div id="myflow_tools"  >
		 
		 <div class="myflow_tools_header_div">
		  
		   <div id="myflow_tools_handle" class="myflow_tools_header">常用组件</div>
		 
		 </div>
		 
		 <div class="myflow_tools_ico">
		 
		<div class="node" id="myflow_save">
		    <img src="${pageContext.request.contextPath }/images/process/img/save.gif" />&nbsp;&nbsp;保存</div>
		<div class="node selectable" id="pointer"><img
			src="${pageContext.request.contextPath }/images/process/img/select16.gif" />&nbsp;&nbsp;选择</div>
		<div class="node selectable" id="path"><img
			src="${pageContext.request.contextPath }/images/process/img/16/flow_sequence.png" />&nbsp;&nbsp;转换</div>
		
		<div class="node state selectable" id="start" type="start"><img
			src="${pageContext.request.contextPath }/images/process/img/16/start_event_empty.png" />&nbsp;&nbsp;开始</div>
		<div class="node state selectable" id="check" type="check"><img
			src="${pageContext.request.contextPath }/images/process/img/16/task_empty.png" />&nbsp;&nbsp;审核</div>	
		
		<div class="node state selectable" id="task" type="task"><img
			src="${pageContext.request.contextPath }/images/process/img/16/task_empty.png" />&nbsp;&nbsp;任务</div>
		
		<div class="node state selectable" id="notify" type="notify"><img
			src="${pageContext.request.contextPath }/images/process/img/16/task_empty.png" />&nbsp;&nbsp;知会</div>	
			
		<!-- <div class="node state" id="state" type="state"><img -->
		<%-- 	src="${pageContext.request.contextPath }/images/process/img/16/task_empty.png" />&nbsp;&nbsp;状态</div> --%>
		
		<div class="node state selectable" id="fork" type="fork"><img
			src="${pageContext.request.contextPath }/images/process/img/16/gateway_parallel.png" />&nbsp;&nbsp;分支</div>
<!-- 		<div class="node state selectable" id="join" type="join"><img -->
<%-- 			src="${pageContext.request.contextPath }/images/process/img/16/gateway_parallel.png" />&nbsp;&nbsp;合并</div> --%>
		<div class="node state selectable" id="end" type="end"><img
			src="${pageContext.request.contextPath }/images/process/img/16/end_event_terminate.png" />&nbsp;&nbsp;结束</div>
		
		<div class="deleteNode" style="width: 150px;" ><img
			src="${pageContext.request.contextPath }/images/process/img/16/end_event_cancel.png" />&nbsp;&nbsp;删除选中的节点</div>
	    		
<!-- 		<div class="node state selectable" id="end-cancel" type="end-cancel"><img -->
<%-- 			src="${pageContext.request.contextPath }/images/process/img/16/end_event_cancel.png" />&nbsp;&nbsp;取消</div> --%>
<!-- 		<div class="node state selectable" id="end-error" type="end-error"><img -->
<%-- 			src="${pageContext.request.contextPath }/images/process/img/16/end_event_error.png" />&nbsp;&nbsp;错误</div> --%>
		 
		 
		 </div>
		 <!-- end 流程按钮 -->
		

		</div>
		
		<div id="myflow_props"
			style="position: absolute; top: 300px; right: 50; background-color: #fff; width: 350px; padding: 3px;"
			class="ui-widget-content">
		<div id="myflow_props_handle" class="myflow_props_header">节点属性</div>
		
		<div class="myflow_props_content">
		
		   <div class="props_line">
		   
		     <div class="props_title">用户角色分配</div>
		     <div class="props_content"><input name="id" value="" /></div>
		     
		   
		   </div>
		   
		
		</div>
		
	
		<div>&nbsp;</div>
		</div>
		
		<div style="width: 100%;overflow: scroll;">
		 
		  <div id="myflow"></div>
		 
		</div>
		
 
 
 
 </div>

</body>
</html>